import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;
import java.awt.Color;
import javax.swing.ImageIcon;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.SwingConstants;
import java.awt.Font;

public class GoUI extends JPanel {
	private BoardUi board;
	private JButton btnReturn;

	public GoUI(Player currentPlayer, Go go_, BoardUi board_) {
		this.board=board_;
		
		setBackground(new Color(240, 255, 240));
		
		setLayout(null);
		
		btnReturn = new JButton("Return");
		btnReturn.setFont(new Font("Verdana", Font.PLAIN, 12));
		btnReturn.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				ReturnGame();
			}
		});
		btnReturn.setBounds(195, 101, 85, 30);
		add(btnReturn);
		
		JLabel label = new JLabel("");
		label.setIcon(new ImageIcon(GoUI.class.getResource("/TitleDeeds/GoUi.jpg")));
		label.setBounds(0, 0, 200, 200);
		add(label);
	}
	
	public void ReturnGame() {
		setVisible(false);
		//board.getGameButtonUI().enableEndTurnBtn();
		board.getDiceUI().rolledDoubles();

	}
	
}
